<template>
  <div class="grandson">
    孙子组件grandson用 inject 读取爷爷组件的数据{{student}}
  </div>
</template>

<script>
export default {
  inject:['student'],
  mounted(){
    console.log(this.student)
  }
}
</script>